<?php

declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class BannerMigrate extends AbstractMigration
{
    public function up(): void {
        
        $table = $this->table('banner',[
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_general_ci'
        ]);

        $table->addColumn('title', 'string', ['limit' => 128,'collation' => 'utf8mb4_general_ci','null' => true])
            ->addColumn('image', 'string', ['limit' => 256,'collation' => 'utf8mb4_general_ci','null' => true])
            ->addColumn('path', 'string', ['limit' => 256,'collation' => 'utf8mb4_general_ci','null' => true])
            ->addColumn('sort_by', 'integer', ['limit' => 11,'null' => true])
            ->addColumn('created_at', 'integer', ['limit'=>11])
            ->addColumn('updated_at', 'integer', ['limit'=>11])
            ->save();
    }
}
